import request from "@/utils/request";

// 获取用户信息
export const fetchUser = (userId: string) => {
  return request.get(`http://localhost:3002/users/${userId}`);
};

// 新增用户
export const addUser = (params: { name: string; age: number }) => {
  return request.post<any>(`http://localhost:3002/users`, params);
};
// 获取任务状态
export const getTaskStatus = (requestId: string) => {
  return request.get<any>(`http://localhost:3002/users/status/${requestId}`);
};
